button_b
— Onboard Button B¶
The main functionality and function of the button_b
module
Function¶
Get the current state of button B. The result returned is
True
: the button is pressed, or theFalse
: button is not pressed.
Sample Code:¶
import codey
def loop():
while True:
if codey.button_b.is_pressed():
print("button B is pressed")
loop()